package org.jon.action;

import org.jon.entity.Customer;
import org.jon.service.CustomerService;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class CustomerAction extends ActionSupport{
	private Long custId;
	private Customer customer;
	private CustomerService customerService;
	
	public String findCustomerById(){
		customer = customerService.findById(custId);
		ActionContext.getContext().put("customer", customer);
		return SUCCESS;
	}
	
	public Long getCustId() {
		return custId;
	}
	public void setCustId(Long custId) {
		this.custId = custId;
	}
	public Customer getCustomer() {
		return customer;
	}
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
	public void setCustomerService(CustomerService customerService) {
		this.customerService = customerService;
	}
	
	
	

}
